package com.acegear.horizon.domain.events;

import com.acegear.horizon.domain.models.jpa.ContentPart;

import java.util.List;

/**
 * Created by caiyanying on 17/4/21.
 */

public class PostCommentCreateEvent extends BaseEvent {

  private Long commentId;

  private Long postId;

  private PostEventType eventType;

  private Long userId;

  private Long floor;

  private Long replyTo;

  private Long replyFloor;


  private List<ContentPart> contents;


  public PostCommentCreateEvent(Long commentId, Long postId, PostEventType eventType, Long userId,
                                Long floor, Long replyTo, Long replyFloor,
                                List<ContentPart> contents) {
    this.commentId = commentId;
    this.postId = postId;
    this.eventType = eventType;
    this.userId = userId;
    this.floor = floor;
    this.replyTo = replyTo;
    this.replyFloor = replyFloor;
    this.contents = contents;
    genEventId();
  }

  public PostCommentCreateEvent() {
  }

  public Long getPostId() {
    return postId;
  }

  public void setPostId(Long postId) {
    this.postId = postId;
  }

  public Long getCommentId() {
    return commentId;
  }

  public void setCommentId(Long commentId) {
    this.commentId = commentId;
  }

  public PostEventType getEventType() {
    return eventType;
  }

  public void setEventType(PostEventType eventType) {
    this.eventType = eventType;
  }

  public Long getUserId() {
    return userId;
  }

  public void setUserId(Long userId) {
    this.userId = userId;
  }

  public Long getFloor() {
    return floor;
  }

  public void setFloor(Long floor) {
    this.floor = floor;
  }

  public Long getReplyTo() {
    return replyTo;
  }

  public void setReplyTo(Long replyTo) {
    this.replyTo = replyTo;
  }

  public Long getReplyFloor() {
    return replyFloor;
  }

  public void setReplyFloor(Long replyFloor) {
    this.replyFloor = replyFloor;
  }


  public List<ContentPart> getContents() {
    return contents;
  }

  public void setContents(List<ContentPart> contents) {
    this.contents = contents;
  }

  @Override
  public String routingKey() {
    return "horizon.domain.user.post.comment.new";
  }
}
